import request from '@/utils/request'

// 查询耗课信息列表
export function listConsume(query) {
  return request({
    url: '/system/consume/list',
    method: 'get',
    params: query
  })
}
export function listConsumeTj(query) {
  return request({
    url: '/system/consume/listTj',
    method: 'get',
    params: query
  })
}
export function listConsumeTjXs(query) {
  return request({
    url: '/system/consume/listXsTj',
    method: 'get',
    params: query
  })
}

// 查询耗课信息详细
export function getConsume(id) {
  return request({
    url: '/system/consume/' + id,
    method: 'get'
  })
}
export function getConsumeHk(query) {
  return request({
    url: '/system/consume/hk',
    method: 'get',
    params: query
  })
}
export function getConsumeHkByIds(id) {
  return request({
    url: '/system/consume/hkId/'+id,
    method: 'get'    
  })
}

// 新增耗课信息
export function addConsume(data) {
  return request({
    url: '/system/consume',
    method: 'post',
    data: data
  })
}

// 修改耗课信息
export function updateConsume(data) {
  return request({
    url: '/system/consume',
    method: 'put',
    data: data
  })
}

// 删除耗课信息
export function delConsume(id) {
  return request({
    url: '/system/consume/' + id,
    method: 'delete'
  })
}

// 导出耗课信息
export function exportConsume(query) {
  return request({
    url: '/system/consume/export',
    method: 'get',
    params: query
  })
}